﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DotNetPerls;
using PMC.Interfaces;

namespace PMCgui
{
    public class OverrideConfirm : IOverrideable
    {
        public DialogResult Result { get; private set; }

        public OverrideConfirm()
        {
            Result = DialogResult.None;
        }

        #region Implementation of IOverrideable

        public DialogResult AllowOverride(string name)
        {
            var mes = BetterDialog.ShowDialog("Duplicate override", "Duplicate found!",
                                              name + " already exists do you want to override? Click 'Yes' to override, " +
                                              "'No' to keep original or 'Abort' to abort.",
                                              "Yes", "No", "Abort", SystemIcons.Exclamation);
            Result = mes;
            return mes;
        }

        #endregion
    }
}
